<!-- 导航 -->
<div class="btn-group">
	</a>
	<a class="btn btn-default " av-class="{'active':checkedIndex == 'user'}"
		av-event="[click] eventSelectUserInfonType(:node,:event,'user')">基础信息</a>
	<a class="btn btn-default" av-class="{'active':checkedIndex == 'user_password'}"
		av-event="[click] eventSelectUserInfonType(:node,:event,'user_password')">修改密码</a>
	<a class="btn btn-default" av-class="{'active':checkedIndex == 'user_phone'}"
		av-event="[click] eventSelectUserInfonType(:node,:event,'user_phone')">认证手机</a>
	<a class="btn btn-default" av-class="{'active':checkedIndex == 'user_parent'}"
		av-event="[click] eventSelectUserInfonType(:node,:event,'user_parent')" av-if="!applicationCheckZhongrunhuizhan()">推荐人</a>
		<a av-if="applicationCheckEmshop()" class="btn btn-default" av-class="{'active':checkedIndex == 'supplyAgain'}"
			av-event="[click] eventSelectUserInfonType(:node,:event,'supplyAgain')">补发优惠券</a>
</div>
<hr /><br />
<div av-if="checkedIndex == 'user'">
	<div class="form-group">
		<label>用户ID：</label>
		<input type="text" class="form-control" readonly="readonly" av-attr="[value]  userinfo.user_id">
	</div>
	<div class="form-group">
		<label>注册时间：</label>
		<input type="text" class="form-control" readonly="readonly"
			av-attr="[value] av.date('yyyy/MM/dd HH:mm EEE',parseInt(userinfo.user_register_time) * 1000)">
	</div>

	<hr />
	<div class="form-group">
		<label style="display: block;">用户头像：</label>
		<input name="userLogo-files" type="file" style="left:-99999px;position:absolute;" av-event="[change] eventFileChange(:node,:event)" />
		<div class="btn-group">
			<button type="button" class="btn btn-default" av-event="[click] eventUpLoad(:node,:event)">选择图片</button>
			<button type="button" class="btn btn-info" av-class="{'disabled':submitLock}" av-event="[click] eventUpLoadSubmit(:node,:event)" >确定上传</button>
		</div>
		<br /><br />
		<div>
			<img class="image-look" av-if="userLogoUploadFile.file" av-attr="[src] userLogoUploadFile.url" name="image-show" style="max-height: 100px; cursor: pointer;">
			{{userLogoUploadFile.uploadPercent}}
			<img av-if="userinfo.user_logo_image_id" class="image-look"
				av-attr="[src] applicationConfig.qiniu_domain+userinfo.user_logo_image_id"
				av-attr="[data-width] userinfo.user_logo_image_width" av-attr="[data-height] userinfo.user_logo_image_height"
				style="max-height: 100px; cursor: pointer;">
			<span av-else style="color: #999999;">无头像图片</span>
		</div>
	</div>
	<hr />


	<div class="form-group">
		<label>昵称：</label>
		<input type="text" class="form-control" placeholder="用户昵称" name="user_nickname"
			av-attr="[value]  userinfo.user_nickname">
	</div>
	<div class="form-group">
		<label>姓名：</label>
		<input type="text" class="form-control" placeholder="用户姓名" name="user_compellation"
			av-attr="[value]  userinfo.user_compellation">
	</div>

	<div class="form-group">
		<label>是否封禁：</label>
		<label class="checkbox-inline">
			<input type="checkbox" value="0" name="user_state"
				av-attr="[checked] parseInt(userinfo.user_state)==0?'checked':false">
			是
		</label>
	</div>


	<div class="form-group">
		<label>性别：</label>
		<div class="radio" style="display: inline-block;margin-right: 10px;">
			<label>
				<input type="radio" name="user_sex" value="0" av-attr="[checked] parseInt(userinfo.user_sex)==0?'checked':false">
				未知
			</label>
		</div>
		<div class="radio" style="display: inline-block;margin-right: 10px;">
			<label>
				<input type="radio" name="user_sex" value="1" av-attr="[checked] parseInt(userinfo.user_sex)==1?'checked':false"> 男
			</label>
		</div>
		<div class="radio" style="display: inline-block;margin-right: 10px;">
			<label>
				<input type="radio" name="user_sex" value="2" av-attr="[checked] parseInt(userinfo.user_sex)==2?'checked':false"> 女
			</label>
		</div>
	</div>
	<br />
	<button type="button" class="btn btn-primary" av-event="[click] submit_user(:node,:event)">确定更新</button>
	<hr />
	<span style="color: #999999;">更新时间：
		{{av.date("yyyy/MM/dd HH:mm EEE", parseInt(user.user_update_time) * 1000)}}</span>
	<div style="height: 100px;"></div>
</div>
<div av-else-if="checkedIndex == 'user_password'">
	<div class="form-group">
		<label>用户ID：</label>
		<input type="text" class="form-control" readonly="readonly" av-attr="[value] userinfo.user_id">
	</div>
	<div class="form-group">
		<label>注册时间：</label>
		<input type="text" class="form-control" readonly="readonly"
			av-attr="[value] av.date('yyyy/MM/dd HH:mm EEE',parseInt(userinfo.user_register_time) * 1000)">
	</div>
	<div class="form-group">
		<label>昵称：</label>
		<input type="text" class="form-control" readonly="readonly" av-attr="[value] userinfo.user_nickname">
	</div>

	<hr />
	<div class="form-group">
		<label>登录密码：</label>
		<input type="password" class="form-control" placeholder="输入新的登录密码" name="user_password">
	</div>
	<div class="form-group">
		<label>确认密码：</label>
		<input type="password" class="form-control" placeholder="再输入一次新的登录密码" name="user_confirm_password">
	</div>

	<br />
	<button type="button" class="btn btn-primary" av-class="{'disabled':submitLock}" av-event="[click] submit_user_password(:node,:event)">确定更新</button>

	<hr />
	<span style="color: #999999;">更新时间：
		{{av.date("yyyy/MM/dd HH:mm EEE", parseInt(user.user_update_time) * 1000)}}</span>
	<div style="height: 100px;"></div>
</div>
<div av-else-if="checkedIndex == 'user_phone'">

	<div class="form-group">
		<label>用户ID：</label>
		<input type="text" class="form-control" readonly="readonly" av-attr="[value] userinfo.user_id">
	</div>
	<div class="form-group">
		<label>注册时间：</label>
		<input type="text" class="form-control" readonly="readonly"
			av-attr="[value] av.date('yyyy/MM/dd HH:mm EEE',parseInt(userinfo.user_register_time) * 1000)">
	</div>
	<div class="form-group">
		<label>昵称：</label>
		<input type="text" class="form-control" readonly="readonly" av-attr="[value] userinfo.user_nickname">
	</div>

	<hr />
	<div class="alert alert-warning" role="alert">
		<strong>注意!</strong> 手机号如果不是[登录账号]，那么该手机号是无法登录的。用户可以通过用手机号重置密码的方式，让手机号初始化为[登录账号]。或者只能通过当前管理员操作方式设置。
	</div>
	<table class="table table-hover table-bordered">
		<tbody>
			<!--for{var i in response.user_phone_list}-->
			<tr av-if="user_phone_list && user_phone_list.length" av-for="(value,key)user_phone_list"
				av-attr="[class] 'user_phone_form'+value.user_phone_id">
				<th scope="row">#
					{{key+1}}
				</th>
				<td style="max-width: 200px;">
					{{value.user_phone_id}}
				</td>
				<td style="max-width: 150px;">
					<div class="input-group">
						<span class="input-group-addon">排序</span>
						<input type="text" name="user_phone_sort" class="form-control" placeholder="排序"
							av-attr="[value] value.user_phone_sort">
					</div>
				</td>
				<td>
					<div class="checkbox">
						<label>
							<input name="user_phone_type" type="checkbox"
								av-attr="[checked] parseInt(value.user_phone_type)?'checked':false"> 登录账号
						</label>
					</div>
				</td>
				<td>
					<button type="button" class="btn btn-default btn-sm"
						av-event="[click] submit_edit_phone(:node,:event,value.user_phone_id)"><span class="glyphicon glyphicon-edit"></span>
						编辑</button>
					<button type="button" class="btn btn-danger btn-sm"
						av-event="[click] submit_remoive_phone(:node,:event,value.user_phone_id)"><span class="glyphicon glyphicon-remove"></span> 删除</button>
				</td>
			</tr>

			<tr class="user_phone_add_form">
				<td></td>
				<td style="max-width: 200px;">
					<div class="input-group">
						<span class="input-group-addon">手机号</span>
						<input name="user_phone_id" type="text" class="form-control" placeholder="手机号">
					</div>
				</td>
				<td style="max-width: 150px;">
					<div class="input-group">
						<span class="input-group-addon">排序</span>
						<input name="user_phone_sort" type="text" class="form-control" placeholder="排序">
					</div>
				</td>
				<td>
					<div class="checkbox">
						<label>
							<input name="user_phone_type" type="checkbox"> 登录账号
						</label>
					</div>
				</td>
				<td><button type="button" class="btn btn-primary btn-sm" av-class="{'disabled':submitLock}" av-event="[click] submit_user_phone(:node,:event)"><span
							class="glyphicon glyphicon-ok" ></span> 添加认证手机号码</button></td>
			</tr>
		</tbody>
	</table>




	<hr />
	<span style="color: #999999;">更新时间：
		{{av.date("yyyy/MM/dd HH:mm EEE", parseInt(user.user_update_time) * 1000)}} </span>
	<div style="height: 100px;"></div>


</div>
<div av-else-if="checkedIndex == 'user_parent'">
	<div class="form-group">
		<label>用户ID：</label>
		<input type="text" class="form-control" readonly="readonly" av-attr="[value] userinfo.user_id">
	</div>
	<div class="form-group">
		<label>注册时间：</label>
		<input type="text" class="form-control" readonly="readonly"
			av-attr="[value] av.date('yyyy/MM/dd HH:mm EEE',parseInt(userinfo.user_register_time) * 1000)">
	</div>
	<div class="form-group">
		<label>昵称：</label>
		<input type="text" class="form-control" readonly="readonly" av-attr="[value] userinfo.user_nickname">
	</div>

	<hr />

	<div class="panel panel-default">
		<div class="panel-body" av-if="user_parent_get.user_id">
			<div>推荐人ID:{{user_parent_get.user_id}}
			</div>
			<div>推荐人昵称：{{user_parent_get.user_nickname}}
			</div>
			<div>推荐人姓名：{{user_parent_get.user_compellation}}
			</div>
			<div>推荐人手机号：{{user_parent_get.user_phone}}
			</div>
			<div>推荐人注册时间：{{av.date("yyyy/MM/dd HH:mm EEE", parseInt(user.user_register_time) * 1000)}}
			</div>
			<div>操作：<button type="button" class="btn btn-danger btn-xs" av-event="[click] submit_remoive_tuijian(:node,:event)"><span
						class="glyphicon glyphicon-trash"></span> 删除推荐人</button></div>
		</div>
		<div class="panel-body" av-else>
			<span style="color: #999999;">无推荐人</span>
		</div>
	</div>


	<div class="form-group">
		<label>输入推荐人ID或者推荐人登录手机号：</label>
		<input type="text" class="form-control" placeholder="输入推荐人ID或者推荐人登录手机号" name="user_parent">
	</div>
	<br />
	<button type="button" class="btn btn-primary" av-class="{'disabled':submitLock}" av-event="[click] submit_user_parent(:node,:event)">更新推荐人</button>

	<hr />
	<span style="color: #999999;">更新时间：
		{{av.date("yyyy/MM/dd HH:mm EEE", parseInt(user.user_update_time) * 1000)}} </span>
	<div style="height: 100px;"></div>
</div>
<div av-else-if="checkedIndex == 'supplyAgain' && applicationCheckEmshop()">
	<div class="form-group">
		<label>补发393会员400元优惠券</label>
	</div>
	<button type="button" class="btn btn-primary" av-class="{'disabled':submitLock}" av-event="[click] submit_supplyAgain(:node,:event)">确定补发</button>

	<hr />
	<div style="height: 100px;"></div>
</div>